<%@ include file="/WEB-INF/jsp/includes.jsp" %>
<%@ include file="/WEB-INF/jsp/header.jsp" %>

<h2>Buddys
<c:if test="${ sessionScope.user != null}"> of ${sessionScope.user.nickname }</c:if>:</h2>
<p style="color: red; font-size: 9px; margin-left: 20px;">${msg}</p>
<hr />
<h4>My Buddy List</h4>
<table>
  <thead>
    <th>Name</th>
    <th>Gender</th>
    <th>department</th>
    <th>telephone</th>
    <th></th>
  </thead>
  <c:forEach var="buddy" items="${buddyList}">
    <tr>
      <td>${buddy.nickname}</td>
      <td>${buddy.gender}</td>
      <td>${buddy.department}</td>
      <td>${buddy.telephone}</td>
      <td><a href="<spring:url value="/displayBuddy?id=${buddy.person_id}" htmlEscape="true"/>">View Detail</a></td>
      
    </tr>
  </c:forEach>
</table>
<h4>My Black List</h4>
<table>
  <thead>
    <th>Name</th>
    <th>Gender</th>
    <th>Department</th>
  </thead>
  <c:forEach var="blackList" items="${blackList}">
    <tr>
      <td>${blackList.nickname}</td>
      <td>${blackList.gender}</td>
      <td>${blackList.department}</td>
    </tr>
  </c:forEach>
</table>

<%@ include file="/WEB-INF/jsp/footer.jsp" %>
